// print number from n to lim without if and while predicate
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>

void print(int n, int lim);
void quit(int n, int lim);

void (*func[])(int, int)  = {quit, print};

void print(int n, int lim)
{
    printf("%d\n",n);
    func[n<lim](n+1, lim);
}
void quit(int n, int lim)
{
    exit(0);
}

int main(int argc, char *argv[])
{
    print(1,1000);

    return 0;
}
